package com.zeng.service;

import com.zeng.dao.BookDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.inject.Inject;

/**
 * @author Zqm
 * @Title: BookService
 * @ProjectName SpringAnnotationDriven
 * @date 2019/1/10
 */
@Service
public class BookService {

//    @Qualifier("bookDao")
//    @Autowired(required = false)  //非必须注入找到
//    @Resource(name = "bookDao2")
    @Inject
    private BookDao bookDao;

    public void print(){
        System.out.println(bookDao);
    }
}
